{% macro gen_table(brands, current_user, kwargs) %}
    <table id="brand-table"
           class="table table-bordered table-hover table-condensed table-striped">
        <thead>
        <tr>
            <th>序号</th>
            <th>产品类型</th>
            <th>品牌名称</th>
            <th>权重</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for each in brands %}
            <tr>
                <td>{{ loop.index }}</td>
                <td>{{ each.product_type_name }}</td>
                <td>{{ each.brand_name }}</td>
                <td>{{ each.weight }}</td>
                <td>
                    <a
                            class="btn btn-xs btn-primary"
                            href="{{ url_for('product_bp.edit_brand', brand_id=each.id) }}"
                            name="user-info"
                            target="_self"
                    >编辑</a><br>
{#                    {% if current_user.is_authenticated %}#}
{#                        <a#}
{#                                class="btn btn-group btn-xs btn-danger"#}
{#                                href="{{ url_for('product_bp.ajax_delete_brand', brand_id=each.id, **kwargs) }}"#}
{#                                onclick="if(confirm('确认删除') == false) return false;"#}
{#                                name="user-info"#}
{#                                target="_self"#}
{#                        >删除</a>#}
{#                    {% endif %}#}
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endmacro %}
